<script setup lang="ts">
// 不加类型, 参数“e”隐式具有“any”类型,不具有任何提示
// const inputHandler = (e)=>{}

//给事件对象e添加类型,有提示
const inputHandler = (e:Event)=>{
console.log((e.target as HTMLInputElement).value)
}

//添加额外参数
const inputHandlerParams= (e: Event, msg:string)=>{
console.log((e.target as HTMLInputElement).value)
console.log(msg)
} 
</script>

<template>
  <input type="text" @input="inputHandler">
  <input type="text" @input="(e)=>inputHandlerParams(e,'this is msg')">
</template>

